//这个类用来验证用户用户名和 密码
package common.util.mail;

import javax.mail.*;
import javax.mail.PasswordAuthentication;

public class MyAuthenticator extends Authenticator{
		String userName=null;
		String passWord=null;
		public MyAuthenticator(String username, String password) {
			this.userName = username;
			this.passWord = password;
		}
		protected PasswordAuthentication getPasswordAuthentication(){
			return new PasswordAuthentication(userName, passWord);
		}
}